<template>
	<view>
		<view class="banner">
			<swiper class="swiper" circular :autoplay="autoplay" :interval = 'interval'>
				<swiper-item v-for="(item,index) in bannerImg" :key="index">
						<view class="swiper-item uni-bg-red"><image :src="item" mode="widthFix"></image></view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>
	
<script>
	export default {
		name:"bannerItem",
		data() {
			return {
				//是否回到开头
				isOK:true,
				//是否自动切换
				autoplay:true,
				//切换时长
				interval:2000
			};
		},
		props:['bannerImg']
	}
</script>
<style scoped lang="scss">
	.banner{
		width: 100%;
		margin-top: 20rpx;
		border-radius: 20rpx;
		overflow: hidden;
		.swiper-item{
			width: 100%;
			border-radius: 20rpx;
			
			image{
				width:100%;
				border-radius: 20rpx;
			}
		}

	}


</style>